<h1><?=$this->title;?></h1>
<?
    Principio_Library_Common::printErrorsAndMsg();

    $result = $this->search_result;
    if (!empty($result))
    {
?>
<div class="results">
<?
        foreach ($result as $res)
        {
?>
    <div class="table_item">
        <?
        $parent_id = $res->getParentID();
        ?>
        <span class="pointer" onclick="ajax<?=$res->getOpenItemFunctionName();?>({id: <?=$res->getId();?>, action: 'edit', container: 'inner', no_apply: true <?if ($parent_id){echo ", company_id: ".$parent_id;}?>});">
            <?=$res->getResultName();?>
        </span><br>
<?
            $result_array = $res->getResult();
            foreach ($result_array as $field_name => $result_item)
            {
?>
                <div>
                    <b><?=$field_name?>:</b><?="  ".$result_item?>
                </div>
<?                
            }
?>
    </div>
<?
        }
?>
</div>
<?
    }
?>
<div id="container" style="margin-top: 80px;"></div>